GDK W32: Handle CapsLock as part of the key shift level
authorРуслан Ижбулатов <lrn1986@gmail.com>
Wed, 4 Jan 2017 04:31:53 +0000 (04:31 +0000)
committerРуслан Ижбулатов <lrn1986@gmail.com>
Sat, 2 Dec 2017 10:38:20 +0000 (10:38 +0000)
commitcba75d82394c37e5b2ae3e18aaabfe05a473ed01
treeb009bed0dc62f24609ee3e953cff412d7d4b578a
parent33442d953da28ebad653966d9f12a96700488e9e
GDK W32: Handle CapsLock as part of the key shift level

Instead of using some kind of flawed logic about modifying a keypress result
when CapsLock is toggled, just add a CapsLock shift level (and all derived
shift levels, i.e. Shift+CapsLock and CapsLock+AltGr and Shift+CapsLock+AltGr)
and query Windows keyboard layout API about the result of keypresses involving
CapsLock.

Keysym table is going to be (roughly) twice as large now, but CapsLock'ed
keypresses will give correct results for some keyboard layouts (such as
Czech keyboard layout, which without this change produces lowercase letters
for CapsLock->[0,2,3,4...] instead of uppercase ones).

Keymap update time also increases accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=165385
gdk/win32/gdkkeys-win32.c